Skip to content

Interfaces#2

Open
Butcher3Years wants to merge 3 commits intomainfrom
Interfaces
Open

Interfaces#2
Butcher3Years wants to merge 3 commits intomainfrom
Interfaces

Conversation

@Butcher3Years
Copy link
Copy Markdown
Owner

Pure virtual function in C++ is the key feature that lets you create interfaces (or abstract classes that behave like interfaces).
What is a Pure Virtual Function?
A pure virtual function is a virtual function that:

Has = 0 at the end
Has no implementation in the base class (or sometimes just a dummy one)
Forces every derived (child) class to provide its own implementation
we cant instantiate the interface class [only sub classes we can and have to]
Interfaces are just classes in c++ with unimplemented methods acting as template of source unlike other languages as java or c#*/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant